package cz.proks.easyhelpdesk.gwt.place;

import java.util.List;

import cz.proks.easyhelpdesk.gwt.place.base.AHelpdeskPlace;

public class UserPlace extends AHelpdeskPlace {
    private Long userId;

    public UserPlace(Long userId) {     
        this.userId = userId;
        addValue(userId);
    }
    
    public Long getUserId() {
        return userId;
    }

    @Override
    public String getPattern() {
        return "/user/{userId}";
    }

    @Override
    public void initFromList(List<String> initValues) {
        assertInitValues(initValues, 1);
        this.userId = Long.valueOf(initValues.get(0));        
        setPlaceValues(initValues);        
    }                
}
